/*    */package com.slim.daoimpl;

/*    */
/*    */import java.util.List;

import org.appfuse.model.NewProjectDetail;
import org.springframework.stereotype.Repository;

import com.slim.dao.NewProjectDetailDao;

/*    */
/*    */@Repository
/*    */public class NewProjectDetailDaoImpl extends
		GenericDaoHibernate<NewProjectDetail, Long>
/*    */implements NewProjectDetailDao
/*    */{
	
	public NewProjectDetailDaoImpl() {
		super(NewProjectDetail.class);
	}

	public NewProjectDetail loadNewProjectDetailByUserId(Long userId) {
		List newProjectDetailList = getHibernateTemplate().find(
				"from NewProjectDetail where userId=?", userId);
		if ((newProjectDetailList == null) || (newProjectDetailList.isEmpty())) {
			try {
				throw new Exception("userId '" + userId + "' not found...");
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		return (NewProjectDetail) newProjectDetailList.get(0);
	}
	/*    */
	/*    */
	/*    */

	public Long getNewProjectDetailId(Long id) {
		// TODO Auto-generated method stub
		return null;
	}

}
